home *** CD-ROM | disk | FTP | other *** search
- head 1.2;
- branch ;
- access ;
- symbols sprited:1.2.1;
- locks ; strict;
- comment @ * @;
-
-
- 1.2
- date 89.06.15.22.36.49; author douglis; state Exp;
- branches 1.2.1.1;
- next 1.1;
-
- 1.1
- date 88.05.20.15.49.23; author ouster; state Exp;
- branches ;
- next ;
-
- 1.2.1.1
- date 91.12.02.20.37.49; author kupfer; state Exp;
- branches ;
- next ;
-
-
- desc
- @@
-
-
- 1.2
- log
- @changed %12#x to %#12x.
- @
- text
- @/*
- * Mem_PrintInUse.c --
- *
- * Source code for the "Mem_PrintInUse" library procedure. See memInt.h
- * for overall information about how the allocator works..
- *
- * Copyright 1988 Regents of the University of California
- * Permission to use, copy, modify, and distribute this
- * software and its documentation for any purpose and without
- * fee is hereby granted, provided that the above copyright
- * notice appear in all copies. The University of California
- * makes no representations about the suitability of this
- * software for any purpose. It is provided "as is" without
- * express or implied warranty.
- */
-
- #ifndef lint
- static char rcsid[] = "$Header: /sprite/src/lib/c/stdlib/RCS/Mem_PrintInUse.c,v 1.1 88/05/20 15:49:23 ouster Exp Locker: douglis $ SPRITE (Berkeley)";
- #endif not lint
-
- #include "memInt.h"
-
-
- /*
- * ----------------------------------------------------------------------------
- *
- * Mem_PrintInUse --
- *
- * Uses a default procedure to print out the non-binned blocks in
- * the allocator that are still in use. The original size and the
- * PC of the call to Mem_Alloc are printed.
- *
- * Results:
- * None.
- *
- * Side effects:
- * Stuff gets printed (?) by passing it to memPrintProc. See the
- * documentation in Mem_PrintStatsSubr for the calling sequence to
- * memPrintProc.
- *
- * ----------------------------------------------------------------------------
- */
-
- ENTRY void
- Mem_PrintInUse()
- {
- register Address ptr;
-
- LOCK_MONITOR;
-
- if (!memInitialized) {
- (*memPrintProc)(memPrintData, "Allocator not initialized yet.\n");
- return;
- }
-
- (*memPrintProc)(memPrintData, "Large objects still in use:\n");
- (*memPrintProc)(memPrintData, " Location Orig. Size Alloc.PC\n");
-
- for (ptr = memFirst; ptr != memLast; ptr += SIZE(GET_ADMIN(ptr))) {
-
- if (!IS_DUMMY(GET_ADMIN(ptr)) && IS_IN_USE(GET_ADMIN(ptr))) {
- #ifdef MEM_TRACE
- (*memPrintProc)(memPrintData,"%#12x %10d %#12x\n",
- ptr, GET_ORIG_SIZE(ptr), GET_PC(ptr));
- #else
- (*memPrintProc)(memPrintData,"%#12x %10d %12s\n", ptr,
- SIZE(GET_ADMIN(ptr)) - sizeof(AdminInfo), "??");
- #endif MEM_TRACE
-
- }
- }
- UNLOCK_MONITOR;
- }
- @
-
-
- 1.2.1.1
- log
- @Initial branch for Sprite server.
- @
- text
- @d18 1
- a18 1
- static char rcsid[] = "$Header: /sprite/src/lib/c/stdlib/RCS/Mem_PrintInUse.c,v 1.2 89/06/15 22:36:49 douglis Exp $ SPRITE (Berkeley)";
- @
-
-
- 1.1
- log
- @Initial revision
- @
- text
- @d18 1
- a18 1
- static char rcsid[] = "$Header: proto.c,v 1.2 88/03/11 08:39:08 ouster Exp $ SPRITE (Berkeley)";
- d63 1
- a63 1
- (*memPrintProc)(memPrintData,"%12#x %10d %12#x\n",
- d66 1
- a66 1
- (*memPrintProc)(memPrintData,"%12#x %10d %12s\n", ptr,
- @
-